From 94d3b2f09c99f7d37582cc40297bfc3efcf6faad Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 17 Jul 2006 12:55:12 +0000 Subject: [PATCH] use 5 * gtk-timeout-repeat, just as many other widgets. Makes the calendar 2006-07-17 Michael Natterer * gtk/gtkcalendar.c (calendar_timer): use 5 * gtk-timeout-repeat, just as many other widgets. Makes the calendar arrow buttons usable for quick month/year skipping (#142582). --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ gtk/gtkcalendar.c | 4 +++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ce58b379d0..755fcd3dcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-07-17 Michael Natterer + + * gtk/gtkcalendar.c (calendar_timer): use 5 * gtk-timeout-repeat, + just as many other widgets. Makes the calendar arrow buttons + usable for quick month/year skipping (#142582). + 2006-07-17 Richard Hult * gdk/quartz/gdkwindow-quartz.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ce58b379d0..755fcd3dcf 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2006-07-17 Michael Natterer + + * gtk/gtkcalendar.c (calendar_timer): use 5 * gtk-timeout-repeat, + just as many other widgets. Makes the calendar arrow buttons + usable for quick month/year skipping (#142582). + 2006-07-17 Richard Hult * gdk/quartz/gdkwindow-quartz.c: diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 23c593006c..01fe262b0f 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -186,6 +186,8 @@ dates_difference(guint year1, guint mm1, guint dd1, #define DAY_XSEP 0 /* not really good for small calendar */ #define DAY_YSEP 0 /* not really good for small calendar */ +#define SCROLL_DELAY_FACTOR 5 + /* Color usage */ #define HEADER_FG_COLOR(widget) (& (widget)->style->fg[GTK_WIDGET_STATE (widget)]) #define HEADER_BG_COLOR(widget) (& (widget)->style->bg[GTK_WIDGET_STATE (widget)]) @@ -2398,7 +2400,7 @@ calendar_timer (gpointer data) g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL); priv->need_timer = FALSE; - priv->timer = g_timeout_add (timeout, + priv->timer = g_timeout_add (timeout * SCROLL_DELAY_FACTOR, (GSourceFunc) calendar_timer, (gpointer) calendar); } -- 2.30.2